package com.zhangdi.mserver.searchcli;

import com.zhangdi.mserver.searchcli.enums.MatchType;
import org.elasticsearch.index.query.MultiMatchQueryBuilder;
import org.elasticsearch.index.query.Operator;

/**
 * Created by zhangdi on 2021/01/25 13:38:29.
 */
public class MSearchRequest {
    private String fieldName;
    private Object value;
    private Object parm1;
    private String path;
    private MatchType matchType = MatchType.term;
    private Operator operator = Operator.OR;
    private int weight;
    private String[] fieldNames;
    private MultiMatchQueryBuilder.Type multi_type = MultiMatchQueryBuilder.Type.BEST_FIELDS;

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public MatchType getMatchType() {
        return matchType;
    }

    public void setMatchType(MatchType matchType) {
        this.matchType = matchType;
    }

    public Object getParm1() {
        return parm1;
    }

    public void setParm1(Object parm1) {
        this.parm1 = parm1;
    }

    public Operator getOperator() {
        return operator;
    }

    public void setOperator(Operator operator) {
        this.operator = operator;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String[] getFieldNames() {
        return fieldNames;
    }

    public void setFieldNames(String[] fieldNames) {
        this.fieldNames = fieldNames;
    }

    public MultiMatchQueryBuilder.Type getMulti_type() {
        return multi_type;
    }

    public void setMulti_type(MultiMatchQueryBuilder.Type multi_type) {
        this.multi_type = multi_type;
    }
}
